<template>
    <view class="item">
        <!-- <OrderItemService :item="item" @click.stop="$emit('click', item)"></OrderItemService> -->
        <OrderItemGoods :item="item" v-if="type == 'goods'" @click.stop="$emit('click', item)" @handleGetOrderList="handleGetOrderList"></OrderItemGoods>
        <OrderItemLease :item="item" v-if="type == 'lease'" @click.stop="$emit('click', item)" @handleGetOrderList="handleGetOrderList"></OrderItemLease>
        <OrderItemLock :item="item" v-if="type == 'lock'" @click.stop="$emit('click', item)" @handleGetOrderList="handleGetOrderList"></OrderItemLock>
        <OrderItemRescue :item="item" v-if="type == 'rescue'" @click.stop="$emit('click', item)" @handleGetOrderList="handleGetOrderList"></OrderItemRescue>
        <OrderItemService :item="item" v-if="type == 'service'" @click.stop="$emit('click', item)" @handleGetOrderList="handleGetOrderList"></OrderItemService>
    </view>
</template>

<script>
import OrderItemGoods from './order-item-goods.vue'; //商城
import OrderItemLease from './order-item-lease.vue'; //租车
import OrderItemLock from './order-item-lock.vue'; //开锁
import OrderItemRescue from './order-item-rescue.vue'; // 拖车
import OrderItemService from './order-item-service.vue'; //服务
export default {
    components: { OrderItemGoods, OrderItemLease, OrderItemLock, OrderItemRescue, OrderItemService },
    name: 'lz-order-item',
    props: {
        type: {
            type: String,
            default: ''
        },
        item: {
            type: Object,
            default: () => {}
        }
    },
    data() {
        return {};
    },
    methods: {
		//列表数据更新
		 handleGetOrderList(){
			 console.log(2)
			 this.$emit('handleGetOrderList')
		 }
	}
};
</script>

<style scoped lang="scss">
.item {
    padding: 24rpx 0;
}
</style>
